package com.kede.ienum.zhi;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 ** @Author:Pr.li
 ** @Description:
 ** @Date: create in 2023/6/1 17:24
 ***/
@Getter
@AllArgsConstructor
public enum ZhiOrderTypeEnum {

    VIP(1,"vip"),
    ZHI(2,"置换"),
    MONTY(4,"现金置换"),
    CERTI(3,"认证");

    @EnumValue
    private Integer code;
    private String value;

    public static ZhiOrderTypeEnum parse(Integer code) {
        for (ZhiOrderTypeEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

}
